using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class WaybillBackStationMap : EntityTypeConfiguration<WaybillBackStation>
	{
		public WaybillBackStationMap()
		{
			// Primary Key
			this.HasKey(t => t.WaybillBackStationID);

			// Properties
			this.Property(t => t.SignStatus)
				.HasMaxLength(20);
				
			this.Property(t => t.AcceptType)
				.HasMaxLength(20);
				
			this.Property(t => t.Remark)
				.HasMaxLength(20);
				
			this.Property(t => t.POSCode)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("WaybillBackStation");
			this.Property(t => t.WaybillBackStationID).HasColumnName("WaybillBackStationID");
			this.Property(t => t.WaybillNO).HasColumnName("WaybillNO");
			this.Property(t => t.NeedAmount).HasColumnName("NeedAmount");
			this.Property(t => t.FactAmount).HasColumnName("FactAmount");
			this.Property(t => t.NeedBackAmount).HasColumnName("NeedBackAmount");
			this.Property(t => t.FactBackAmount).HasColumnName("FactBackAmount");
			this.Property(t => t.SignStatus).HasColumnName("SignStatus");
			this.Property(t => t.AcceptType).HasColumnName("AcceptType");
			this.Property(t => t.Remark).HasColumnName("Remark");
			this.Property(t => t.DeliverMan).HasColumnName("DeliverMan");
			this.Property(t => t.DeliverStation).HasColumnName("DeliverStation");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreatStation).HasColumnName("CreatStation");
			this.Property(t => t.CreatTime).HasColumnName("CreatTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateStation).HasColumnName("UpdateStation");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.IsSyn).HasColumnName("IsSyn");
			this.Property(t => t.DeductMoney).HasColumnName("DeductMoney");
			this.Property(t => t.POSCode).HasColumnName("POSCode");
		}
	}
}

